package com.mbl.base.modular.mall.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;

import com.mbl.base.core.common.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 团购活动表
 * </p>
 *
 * @author lwj
 * @since 2020-03-22
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("mbl_mall_groupon")
@ApiModel(value="Groupon对象", description="团购活动表")
public class Groupon extends BaseEntity<Groupon> {

    @ApiModelProperty(value = "关联的订单ID")
    private Long orderId;

    @ApiModelProperty(value = "如果是开团用户，则groupon_id是0；如果是参团用户，则groupon_id是团购活动ID")
    private Long grouponId;

    @ApiModelProperty(value = "团购规则ID，关联litemall_groupon_rules表ID字段")
    private Long rulesId;

    @ApiModelProperty(value = "用户ID")
    private Long userId;

    @ApiModelProperty(value = "团购分享图片地址")
    private String shareUrl;

    @ApiModelProperty(value = "开团用户ID")
    private Long creatorUserId;

    @ApiModelProperty(value = "开团时间")
    private LocalDateTime creatorUserTime;

    @ApiModelProperty(value = "团购活动状态，开团未支付则0，开团中则1，开团失败则2")
    private Integer status;
}
